{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div id=\"C5S2jF\"></div>\n",
       "            <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n",
       "                if(!window.letsPlotCallQueue) {\n",
       "                    window.letsPlotCallQueue = [];\n",
       "                }; \n",
       "                window.letsPlotCall = function(f) {\n",
       "                    window.letsPlotCallQueue.push(f);\n",
       "                };\n",
       "                (function() {\n",
       "                    var script = document.createElement(\"script\");\n",
       "                    script.type = \"text/javascript\";\n",
       "                    script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.5.1/js-package/distr/lets-plot.min.js\";\n",
       "                    script.onload = function() {\n",
       "                        window.letsPlotCall = function(f) {f();};\n",
       "                        window.letsPlotCallQueue.forEach(function(f) {f();});\n",
       "                        window.letsPlotCallQueue = [];\n",
       "                        \n",
       "                    };\n",
       "                    script.onerror = function(event) {\n",
       "                        window.letsPlotCall = function(f) {};    // noop\n",
       "                        window.letsPlotCallQueue = [];\n",
       "                        var div = document.createElement(\"div\");\n",
       "                        div.style.color = 'darkred';\n",
       "                        div.textContent = 'Error loading Lets-Plot JS';\n",
       "                        document.getElementById(\"C5S2jF\").appendChild(div);\n",
       "                    };\n",
       "                    var e = document.getElementById(\"C5S2jF\");\n",
       "                    e.appendChild(script);\n",
       "                })()\n",
       "            </script>\n",
       "            "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "from palmerpenguins import load_penguins\n",
    "from lets_plot import *\n",
    "\n",
    "LetsPlot.setup_html()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>species</th>\n",
       "      <th>island</th>\n",
       "      <th>bill_length_mm</th>\n",
       "      <th>bill_depth_mm</th>\n",
       "      <th>flipper_length_mm</th>\n",
       "      <th>body_mass_g</th>\n",
       "      <th>sex</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>39.1</td>\n",
       "      <td>18.7</td>\n",
       "      <td>181.0</td>\n",
       "      <td>3750.0</td>\n",
       "      <td>male</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>39.5</td>\n",
       "      <td>17.4</td>\n",
       "      <td>186.0</td>\n",
       "      <td>3800.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>40.3</td>\n",
       "      <td>18.0</td>\n",
       "      <td>195.0</td>\n",
       "      <td>3250.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>36.7</td>\n",
       "      <td>19.3</td>\n",
       "      <td>193.0</td>\n",
       "      <td>3450.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>339</th>\n",
       "      <td>Chinstrap</td>\n",
       "      <td>Dream</td>\n",
       "      <td>55.8</td>\n",
       "      <td>19.8</td>\n",
       "      <td>207.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>male</td>\n",
       "      <td>2009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>340</th>\n",
       "      <td>Chinstrap</td>\n",
       "      <td>Dream</td>\n",
       "      <td>43.5</td>\n",
       "      <td>18.1</td>\n",
       "      <td>202.0</td>\n",
       "      <td>3400.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>341</th>\n",
       "      <td>Chinstrap</td>\n",
       "      <td>Dream</td>\n",
       "      <td>49.6</td>\n",
       "      <td>18.2</td>\n",
       "      <td>193.0</td>\n",
       "      <td>3775.0</td>\n",
       "      <td>male</td>\n",
       "      <td>2009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>342</th>\n",
       "      <td>Chinstrap</td>\n",
       "      <td>Dream</td>\n",
       "      <td>50.8</td>\n",
       "      <td>19.0</td>\n",
       "      <td>210.0</td>\n",
       "      <td>4100.0</td>\n",
       "      <td>male</td>\n",
       "      <td>2009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>343</th>\n",
       "      <td>Chinstrap</td>\n",
       "      <td>Dream</td>\n",
       "      <td>50.2</td>\n",
       "      <td>18.7</td>\n",
       "      <td>198.0</td>\n",
       "      <td>3775.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2009</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>344 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       species     island  bill_length_mm  bill_depth_mm  flipper_length_mm  \\\n",
       "0       Adelie  Torgersen            39.1           18.7              181.0   \n",
       "1       Adelie  Torgersen            39.5           17.4              186.0   \n",
       "2       Adelie  Torgersen            40.3           18.0              195.0   \n",
       "3       Adelie  Torgersen             NaN            NaN                NaN   \n",
       "4       Adelie  Torgersen            36.7           19.3              193.0   \n",
       "..         ...        ...             ...            ...                ...   \n",
       "339  Chinstrap      Dream            55.8           19.8              207.0   \n",
       "340  Chinstrap      Dream            43.5           18.1              202.0   \n",
       "341  Chinstrap      Dream            49.6           18.2              193.0   \n",
       "342  Chinstrap      Dream            50.8           19.0              210.0   \n",
       "343  Chinstrap      Dream            50.2           18.7              198.0   \n",
       "\n",
       "     body_mass_g     sex  year  \n",
       "0         3750.0    male  2007  \n",
       "1         3800.0  female  2007  \n",
       "2         3250.0  female  2007  \n",
       "3            NaN     NaN  2007  \n",
       "4         3450.0  female  2007  \n",
       "..           ...     ...   ...  \n",
       "339       4000.0    male  2009  \n",
       "340       3400.0  female  2009  \n",
       "341       3775.0    male  2009  \n",
       "342       4100.0    male  2009  \n",
       "343       3775.0  female  2009  \n",
       "\n",
       "[344 rows x 8 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "penguins = load_penguins()\n",
    "penguins"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>species</th>\n",
       "      <th>island</th>\n",
       "      <th>bill_length_mm</th>\n",
       "      <th>bill_depth_mm</th>\n",
       "      <th>flipper_length_mm</th>\n",
       "      <th>body_mass_g</th>\n",
       "      <th>sex</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>39.1</td>\n",
       "      <td>18.7</td>\n",
       "      <td>181.0</td>\n",
       "      <td>3750.0</td>\n",
       "      <td>male</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>39.5</td>\n",
       "      <td>17.4</td>\n",
       "      <td>186.0</td>\n",
       "      <td>3800.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>40.3</td>\n",
       "      <td>18.0</td>\n",
       "      <td>195.0</td>\n",
       "      <td>3250.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Adelie</td>\n",
       "      <td>Torgersen</td>\n",
       "      <td>36.7</td>\n",
       "      <td>19.3</td>\n",
       "      <td>193.0</td>\n",
       "      <td>3450.0</td>\n",
       "      <td>female</td>\n",
       "      <td>2007</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  species     island  bill_length_mm  bill_depth_mm  flipper_length_mm  \\\n",
       "0  Adelie  Torgersen            39.1           18.7              181.0   \n",
       "1  Adelie  Torgersen            39.5           17.4              186.0   \n",
       "2  Adelie  Torgersen            40.3           18.0              195.0   \n",
       "3  Adelie  Torgersen             NaN            NaN                NaN   \n",
       "4  Adelie  Torgersen            36.7           19.3              193.0   \n",
       "\n",
       "   body_mass_g     sex  year  \n",
       "0       3750.0    male  2007  \n",
       "1       3800.0  female  2007  \n",
       "2       3250.0  female  2007  \n",
       "3          NaN     NaN  2007  \n",
       "4       3450.0  female  2007  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "penguins.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"AGFPKR\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"AGFPKR\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"data\":{\n",
       "\"species\":[\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\"],\n",
       "\"flipper_length_mm\":[181.0,186.0,195.0,null,193.0,190.0,181.0,195.0,193.0,190.0,186.0,180.0,182.0,191.0,198.0,185.0,195.0,197.0,184.0,194.0,174.0,180.0,189.0,185.0,180.0,187.0,183.0,187.0,172.0,180.0,178.0,178.0,188.0,184.0,195.0,196.0,190.0,180.0,181.0,184.0,182.0,195.0,186.0,196.0,185.0,190.0,182.0,179.0,190.0,191.0,186.0,188.0,190.0,200.0,187.0,191.0,186.0,193.0,181.0,194.0,185.0,195.0,185.0,192.0,184.0,192.0,195.0,188.0,190.0,198.0,190.0,190.0,196.0,197.0,190.0,195.0,191.0,184.0,187.0,195.0,189.0,196.0,187.0,193.0,191.0,194.0,190.0,189.0,189.0,190.0,202.0,205.0,185.0,186.0,187.0,208.0,190.0,196.0,178.0,192.0,192.0,203.0,183.0,190.0,193.0,184.0,199.0,190.0,181.0,197.0,198.0,191.0,193.0,197.0,191.0,196.0,188.0,199.0,189.0,189.0,187.0,198.0,176.0,202.0,186.0,199.0,191.0,195.0,191.0,210.0,190.0,197.0,193.0,199.0,187.0,190.0,191.0,200.0,185.0,193.0,193.0,187.0,188.0,190.0,192.0,185.0,190.0,184.0,195.0,193.0,187.0,201.0,211.0,230.0,210.0,218.0,215.0,210.0,211.0,219.0,209.0,215.0,214.0,216.0,214.0,213.0,210.0,217.0,210.0,221.0,209.0,222.0,218.0,215.0,213.0,215.0,215.0,215.0,216.0,215.0,210.0,220.0,222.0,209.0,207.0,230.0,220.0,220.0,213.0,219.0,208.0,208.0,208.0,225.0,210.0,216.0,222.0,217.0,210.0,225.0,213.0,215.0,210.0,220.0,210.0,225.0,217.0,220.0,208.0,220.0,208.0,224.0,208.0,221.0,214.0,231.0,219.0,230.0,214.0,229.0,220.0,223.0,216.0,221.0,221.0,217.0,216.0,230.0,209.0,220.0,215.0,223.0,212.0,221.0,212.0,224.0,212.0,228.0,218.0,218.0,212.0,230.0,218.0,228.0,212.0,224.0,214.0,226.0,216.0,222.0,203.0,225.0,219.0,228.0,215.0,228.0,216.0,215.0,210.0,219.0,208.0,209.0,216.0,229.0,213.0,230.0,217.0,230.0,217.0,222.0,214.0,null,215.0,222.0,212.0,213.0,192.0,196.0,193.0,188.0,197.0,198.0,178.0,197.0,195.0,198.0,193.0,194.0,185.0,201.0,190.0,201.0,197.0,181.0,190.0,195.0,181.0,191.0,187.0,193.0,195.0,197.0,200.0,200.0,191.0,205.0,187.0,201.0,187.0,203.0,195.0,199.0,195.0,210.0,192.0,205.0,210.0,187.0,196.0,196.0,196.0,201.0,190.0,212.0,187.0,198.0,199.0,201.0,193.0,203.0,187.0,197.0,191.0,203.0,202.0,194.0,206.0,189.0,195.0,207.0,202.0,193.0,210.0,198.0],\n",
       "\"body_mass_g\":[3750.0,3800.0,3250.0,null,3450.0,3650.0,3625.0,4675.0,3475.0,4250.0,3300.0,3700.0,3200.0,3800.0,4400.0,3700.0,3450.0,4500.0,3325.0,4200.0,3400.0,3600.0,3800.0,3950.0,3800.0,3800.0,3550.0,3200.0,3150.0,3950.0,3250.0,3900.0,3300.0,3900.0,3325.0,4150.0,3950.0,3550.0,3300.0,4650.0,3150.0,3900.0,3100.0,4400.0,3000.0,4600.0,3425.0,2975.0,3450.0,4150.0,3500.0,4300.0,3450.0,4050.0,2900.0,3700.0,3550.0,3800.0,2850.0,3750.0,3150.0,4400.0,3600.0,4050.0,2850.0,3950.0,3350.0,4100.0,3050.0,4450.0,3600.0,3900.0,3550.0,4150.0,3700.0,4250.0,3700.0,3900.0,3550.0,4000.0,3200.0,4700.0,3800.0,4200.0,3350.0,3550.0,3800.0,3500.0,3950.0,3600.0,3550.0,4300.0,3400.0,4450.0,3300.0,4300.0,3700.0,4350.0,2900.0,4100.0,3725.0,4725.0,3075.0,4250.0,2925.0,3550.0,3750.0,3900.0,3175.0,4775.0,3825.0,4600.0,3200.0,4275.0,3900.0,4075.0,2900.0,3775.0,3350.0,3325.0,3150.0,3500.0,3450.0,3875.0,3050.0,4000.0,3275.0,4300.0,3050.0,4000.0,3325.0,3500.0,3500.0,4475.0,3425.0,3900.0,3175.0,3975.0,3400.0,4250.0,3400.0,3475.0,3050.0,3725.0,3000.0,3650.0,4250.0,3475.0,3450.0,3750.0,3700.0,4000.0,4500.0,5700.0,4450.0,5700.0,5400.0,4550.0,4800.0,5200.0,4400.0,5150.0,4650.0,5550.0,4650.0,5850.0,4200.0,5850.0,4150.0,6300.0,4800.0,5350.0,5700.0,5000.0,4400.0,5050.0,5000.0,5100.0,4100.0,5650.0,4600.0,5550.0,5250.0,4700.0,5050.0,6050.0,5150.0,5400.0,4950.0,5250.0,4350.0,5350.0,3950.0,5700.0,4300.0,4750.0,5550.0,4900.0,4200.0,5400.0,5100.0,5300.0,4850.0,5300.0,4400.0,5000.0,4900.0,5050.0,4300.0,5000.0,4450.0,5550.0,4200.0,5300.0,4400.0,5650.0,4700.0,5700.0,4650.0,5800.0,4700.0,5550.0,4750.0,5000.0,5100.0,5200.0,4700.0,5800.0,4600.0,6000.0,4750.0,5950.0,4625.0,5450.0,4725.0,5350.0,4750.0,5600.0,4600.0,5300.0,4875.0,5550.0,4950.0,5400.0,4750.0,5650.0,4850.0,5200.0,4925.0,4875.0,4625.0,5250.0,4850.0,5600.0,4975.0,5500.0,4725.0,5500.0,4700.0,5500.0,4575.0,5500.0,5000.0,5950.0,4650.0,5500.0,4375.0,5850.0,4875.0,6000.0,4925.0,null,4850.0,5750.0,5200.0,5400.0,3500.0,3900.0,3650.0,3525.0,3725.0,3950.0,3250.0,3750.0,4150.0,3700.0,3800.0,3775.0,3700.0,4050.0,3575.0,4050.0,3300.0,3700.0,3450.0,4400.0,3600.0,3400.0,2900.0,3800.0,3300.0,4150.0,3400.0,3800.0,3700.0,4550.0,3200.0,4300.0,3350.0,4100.0,3600.0,3900.0,3850.0,4800.0,2700.0,4500.0,3950.0,3650.0,3550.0,3500.0,3675.0,4450.0,3400.0,4300.0,3250.0,3675.0,3325.0,3950.0,3600.0,4050.0,3350.0,3450.0,3250.0,4050.0,3800.0,3525.0,3950.0,3650.0,3650.0,4000.0,3400.0,3775.0,4100.0,3775.0]\n",
       "},\n",
       "\"mapping\":{\n",
       "\"x\":\"flipper_length_mm\",\n",
       "\"y\":\"body_mass_g\",\n",
       "\"color\":\"species\"\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"species\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"island\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"bill_length_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"bill_depth_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"flipper_length_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"body_mass_g\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"sex\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"year\"\n",
       "}]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"geom\":\"point\",\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data_meta\":{\n",
       "},\n",
       "\"data\":{\n",
       "}\n",
       "},{\n",
       "\"geom\":\"smooth\",\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data_meta\":{\n",
       "},\n",
       "\"method\":\"lm\",\n",
       "\"data\":{\n",
       "\"..ymin..\":[2919.62977219162,2939.950182952555,2960.255383577783,2980.5442175246817,3000.815412826747,3021.06756803195,3041.299136160097,3061.508406372897,3081.693483002111,3101.852261526242,3121.982401024509,3142.081292568844,3162.146022941251,3182.173332987738,3202.1595698456363,3222.100632216098,3241.991907810363,3261.8282020963075,3281.6036575400126,3301.3116627187223,3320.944751038542,3340.4944894087475,3359.9513582209293,3379.3046255041363,3398.5422203545395,3417.6506138578575,3436.614719888402,3455.417833410336,3474.041629982734,3492.466256350272,3510.6705468107475,3528.6324010739486,3546.32935328161,3563.7393452522347,3580.8416876540073,3597.618152076495,3614.0540919874998,3630.139454465018,3645.869533145965,3661.245337329646,3676.2735119243916,3690.9658226195565,3705.338295884477,3719.41015181112,3733.202679046076,3746.7381792751385,3760.0390677308537,3773.1271714831837,3786.023230045778,3798.7465780209554,3811.3149769624533,3823.744560478062,3836.0498592810004,3848.2438784133606,3860.338205132971,3872.343131791366,3884.26778290457,3896.120239405058,3907.9076558494976,3919.6363683156937,3931.3119920415165,3942.9395087071844,3954.523343777529,3966.0674346078613,3977.5752901529945,3989.050043158448,4000.494495693586,4011.9111588338496,4023.302287229777,4034.6699092247823,4046.0158531081906,4057.3417700182213,4068.6491539437925,4079.9393592146703,4091.213615816901,4102.473042824342,4113.718660196957,4124.951399161741,4136.172111362181,4147.381576936338,4145.913497504246,4168.47750335246,4191.026841453977,4213.560547927618,4236.0775779303185,4258.576797649159,4281.056975428094,4303.516771937976,4325.954729291823,4348.369259001585,4370.758628668402,4393.120947296845,4415.454149125693,4437.755975875778,4460.023957331106,4482.255390196509,4504.447315216849,4526.596492604914,4548.699375913487,4570.752084609291,4592.750375771404,4614.6896155539935,4636.56475133275,4658.370285804887,4680.100254739567,4701.7482105771705,4723.307214638667,4744.769841298292,4766.128198035469,4787.373965723307,4808.4984637005045,4829.4927439427065,4850.347717807795,4871.0543171950685,4891.603689411433,4911.98742159308,4932.197786412062,4952.22799648586,4972.072451132461,4991.726956741927,5011.188901871848,5030.457370700101,5049.533183621043,5068.418860859743,5087.118512804542,5105.637667922002,5123.98305440148,5142.162354354851,5160.1839493733,5178.056673974149,5195.789589749599,5213.3917887264115,5230.872230300972,5248.239612624231,5265.502276712722,5282.668139879124,5299.744654195091,5316.738785439626,5333.657008157219,5350.505312881289,5367.289222137252,5384.0138124316545,5400.68373999927,5417.303268585573,5433.876297973119,5450.406392315073,5466.896807622325,5483.350517971059,5499.7702401651695,5516.158456712271,5532.517437062042,5548.849257119001,5565.155817084637,5581.438857711448,5597.699975067812,5613.940633920759,5630.1621798462575,5646.365850175093,5662.5527838784255,5678.724030491391,2922.0383581872993,2940.974684547747,2959.896763775724,2978.8036501989222,2997.694316613927,3016.5676458147855,3035.4224211213536,3054.2573157815505,3073.0708811063773,3091.8615331802866,3110.627537972086,3129.36699465377,3148.0778169168825,3166.7577120595583,3185.40415760365,3204.014375192823,3222.5853015225107,3241.1135560658063,3259.5954053924047,3278.0267239391983,3296.402951193097,3314.719045404078,3332.969434179126,3351.1479626390956,3369.247840278795,3387.2615882860373,3405.1809898776346,3422.997047221384,3440.6999497360575,3458.2790599640566,3475.722924701775,3493.0193204717893,3510.155343433322,3527.1175540260274,3543.8921854831165,3560.465422245853,3576.823748785345,3592.9543612613406,3608.845624323303,3624.487544535199,3639.8722225696642,3654.994241115802,3669.850946713887,3684.4425925453224,3698.7723246729392,3712.846013441357,3726.6719505895676,3740.2604471010186,3753.6233743297885,3766.773690967119,3779.724992308025,3792.491108500109,3805.085767618283,3817.522329567899,3829.813589168907,3841.9716416891542,3854.007801367221,3865.932562583379,3877.7555937127627,3889.485754800965,3901.131131634654,3912.6990802650466,3924.1962774181548,3935.62877341312,3947.0020451839337,3958.3210477678454,3969.590263209866,3980.813746266855,3991.9951666071884,4003.1378474199696,4014.244800494371,4025.318757923659,4036.362200644266,4047.3773840493127,4058.366360926487,4069.3310019684322,4080.273014094142,4091.1939568055195,4102.0952567864715,4112.978220934048],\n",
       "\"..ymax..\":[3302.797897803506,3314.062403765197,3325.342119862595,3336.6382026383208,3347.9519240588816,3359.2846855763028,3370.638034170782,3382.013680680608,3393.4135207740183,3404.8396589725135,3416.2944361968725,3427.7804613751614,3439.300647725379,3450.858254401518,3462.4569342662458,3474.10078861841,3485.794429746771,3497.543052183449,3509.35251346237,3521.2294250062864,3533.1812534090927,3545.2164317615116,3557.344479671956,3569.576129111375,3581.923450983596,3594.399974202904,3607.020784894984,3619.802588095676,3632.763708245904,3645.923998600992,3659.304624863141,3672.927687322564,3686.8156518375285,3700.99057658953,3715.4731509103835,3730.281603210522,3745.4305800221396,3760.9301342672475,3776.7849723089266,3792.9940848478714,3809.55082697575,3826.4434330032113,3843.6558764609154,3861.168937256898,3878.9613267445666,3897.01074323813,3915.294771505041,3933.791584475337,3952.480442635369,3971.342011382814,3990.358529163942,4009.5138623709595,4028.793480290647,4048.184377880913,4067.674967883927,4087.254957948156,4106.9152235575775,4126.647683779716,4146.445184057902,4166.301388314331,4186.210681311134,4206.1680813680905,4226.169163020371,4246.209988912666,4266.287050090157,4286.3972138073295,4306.537677994817,4326.705931577176,4346.899719903877,4367.117014631496,4387.355987470713,4407.614987283308,4427.892520080362,4448.187231532109,4468.497891652503,4488.823381367689,4509.1626807177,4529.51485847554,4549.879062997727,4570.254514146195,4456.2610424877685,4472.416784811674,4488.587194882273,4504.7732365807515,4520.975954750171,4537.19648320345,4553.436053596634,4569.696005258872,4585.977796077141,4602.283014539502,4618.613393044805,4634.9708225884815,4651.357368931749,4667.775290353788,4684.227057070579,4700.715372377292,4717.243195529071,4733.8137663131265,4750.430631176673,4767.097670652988,4783.819127662995,4800.599636052521,4817.444248445888,4834.35846214587,4851.348241383306,4868.420033717823,4885.58077782845,4902.837899340941,4920.199290775883,4937.673271260164,4955.268521455087,4972.993989385004,4990.858763692036,5008.871912476881,5027.042288432633,5045.378304423109,5063.887687776247,5082.577225874565,5101.4525194000835,5120.51776196274,5139.775565004935,5159.226844348802,5178.87077959998,5198.704850533399,5218.72494676072,5238.925539815379,5259.29990150802,5279.840349726765,5300.53850288044,5321.385526451711,5342.372358848376,5363.4899080436835,5384.7292146412465,5406.081580490103,5427.538664573732,5449.092549579449,5470.735783435602,5492.461400363187,5514.262925817713,5536.134369265759,5558.070208181915,5580.065366059636,5602.115186664137,5624.215406249953,5646.362125034527,5668.551778864692,5690.7811117295605,5713.0471495529455,5735.347175530951,5757.678707155973,5780.039474978322,5802.4274030934785,5824.8405912999615,5847.277298845271,5869.735929661029,5892.215018980199,5914.71322122682,5937.2292990701035,5959.762113538891,5982.310615098045,3311.6983076738534,3322.521358308529,3333.358656075674,3344.2111466475994,3355.0798572277163,3365.9659050219816,3376.870506710535,3387.794989045462,3398.740800715757,3409.709525636971,3420.7028978402936,3431.7228181537334,3442.7713728857443,3453.8508547381903,3464.963786189222,3476.112945595171,3487.301396260607,3498.532518712433,3509.8100463809583,3521.1381048292865,3532.5212545705112,3543.9645373546523,3555.473525574728,3567.054374109882,3578.713873465304,3590.4595024531855,3602.29947785671,3614.242797508084,3626.2992719885324,3638.479538755657,3650.7950510130604,3663.2580322381696,3675.881386271759,3688.678552674177,3701.6632982122096,3714.8494384445967,3728.2504889002284,3741.8792534193544,3755.7473673525155,3769.8648241357414,3784.2395230964,3798.8768815453836,3813.7795529424225,3828.947284106109,3844.3769289736156,3860.0626172003213,3875.9960570472326,3892.166937530905,3908.563387297257,3925.1724476550503,3941.980523309266,3958.9737841123056,3976.138501989253,3993.461317034761,4010.9294344288746,4028.530758903751,4046.253976220806,4064.088591999772,4082.0249378655117,4100.054153772431,4118.168153933866,4136.359582298595,4154.62176214061,4172.948643140767,4191.334748365077,4209.775122776287,4228.265284329391,4246.801178267526,4265.379134922312,4283.995831104655,4302.648255025377,4321.333674591212,4340.0496088657255,4358.793802455802,4377.564202573752,4396.35893852693,4415.176303396343,4434.014737680086,4452.872814694258,4471.749227541804],\n",
       "\"flipper_length_mm\":[172.0,172.48101265822785,172.9620253164557,173.44303797468353,173.9240506329114,174.40506329113924,174.8860759493671,175.36708860759495,175.84810126582278,176.32911392405063,176.81012658227849,177.29113924050634,177.77215189873417,178.25316455696202,178.73417721518987,179.21518987341773,179.69620253164558,180.1772151898734,180.65822784810126,181.13924050632912,181.62025316455697,182.1012658227848,182.58227848101265,183.0632911392405,183.54430379746836,184.0253164556962,184.50632911392404,184.9873417721519,185.46835443037975,185.9493670886076,186.43037974683546,186.91139240506328,187.39240506329114,187.873417721519,188.35443037974684,188.8354430379747,189.31645569620252,189.79746835443038,190.27848101265823,190.7594936708861,191.2405063291139,191.72151898734177,192.20253164556962,192.68354430379748,193.1645569620253,193.64556962025316,194.126582278481,194.60759493670886,195.08860759493672,195.56962025316454,196.0506329113924,196.53164556962025,197.0126582278481,197.49367088607596,197.9746835443038,198.45569620253164,198.9367088607595,199.41772151898735,199.8987341772152,200.37974683544303,200.86075949367088,201.34177215189874,201.8227848101266,202.30379746835445,202.78481012658227,203.26582278481013,203.74683544303798,204.2278481012658,204.7088607594937,205.18987341772151,205.67088607594937,206.15189873417722,206.63291139240505,207.1139240506329,207.59493670886076,208.0759493670886,208.55696202531647,209.0379746835443,209.51898734177215,210.0,203.0,203.35443037974684,203.70886075949366,204.0632911392405,204.41772151898735,204.77215189873417,205.126582278481,205.48101265822785,205.83544303797467,206.18987341772151,206.54430379746836,206.8987341772152,207.25316455696202,207.60759493670886,207.9620253164557,208.31645569620252,208.67088607594937,209.0253164556962,209.37974683544303,209.73417721518987,210.08860759493672,210.44303797468353,210.79746835443038,211.15189873417722,211.50632911392404,211.86075949367088,212.21518987341773,212.56962025316454,212.9240506329114,213.27848101265823,213.63291139240505,213.9873417721519,214.34177215189874,214.69620253164558,215.0506329113924,215.40506329113924,215.7594936708861,216.1139240506329,216.46835443037975,216.8227848101266,217.1772151898734,217.53164556962025,217.8860759493671,218.2405063291139,218.59493670886076,218.9493670886076,219.30379746835445,219.65822784810126,220.0126582278481,220.36708860759495,220.72151898734177,221.0759493670886,221.43037974683546,221.78481012658227,222.13924050632912,222.49367088607596,222.84810126582278,223.20253164556962,223.55696202531647,223.91139240506328,224.26582278481013,224.62025316455697,224.9746835443038,225.32911392405063,225.68354430379748,226.0379746835443,226.39240506329114,226.74683544303798,227.1012658227848,227.45569620253164,227.81012658227849,228.1645569620253,228.51898734177215,228.873417721519,229.22784810126583,229.58227848101265,229.9367088607595,230.29113924050634,230.64556962025316,231.0,178.0,178.43037974683546,178.86075949367088,179.29113924050634,179.72151898734177,180.15189873417722,180.58227848101265,181.0126582278481,181.44303797468353,181.873417721519,182.30379746835442,182.73417721518987,183.16455696202533,183.59493670886076,184.0253164556962,184.45569620253164,184.8860759493671,185.31645569620252,185.74683544303798,186.1772151898734,186.60759493670886,187.0379746835443,187.46835443037975,187.8987341772152,188.32911392405063,188.7594936708861,189.18987341772151,189.62025316455697,190.0506329113924,190.48101265822785,190.91139240506328,191.34177215189874,191.77215189873417,192.20253164556962,192.63291139240505,193.0632911392405,193.49367088607596,193.9240506329114,194.35443037974684,194.78481012658227,195.21518987341773,195.64556962025316,196.0759493670886,196.50632911392404,196.9367088607595,197.36708860759495,197.79746835443038,198.22784810126583,198.65822784810126,199.08860759493672,199.51898734177215,199.9493670886076,200.37974683544303,200.81012658227849,201.2405063291139,201.67088607594937,202.1012658227848,202.53164556962025,202.9620253164557,203.39240506329114,203.8227848101266,204.25316455696202,204.68354430379748,205.1139240506329,205.54430379746836,205.9746835443038,206.40506329113924,206.8354430379747,207.26582278481013,207.69620253164558,208.126582278481,208.55696202531647,208.9873417721519,209.41772151898735,209.84810126582278,210.27848101265823,210.7088607594937,211.13924050632912,211.56962025316454,212.0],\n",
       "\"body_mass_g\":[3111.213834997563,3127.006293358876,3142.798751720189,3158.5912100815012,3174.3836684428143,3190.1761268041264,3205.9685851654394,3221.7610435267525,3237.5535018880646,3253.3459602493776,3269.1384186106907,3284.930876972003,3300.723335333315,3316.515793694628,3332.308252055941,3348.100710417254,3363.893168778567,3379.6856271398783,3395.4780855011913,3411.2705438625044,3427.0630022238174,3442.8554605851295,3458.6479189464426,3474.4403773077556,3490.2328356690678,3506.025294030381,3521.817752391693,3537.610210753006,3553.402669114319,3569.195127475632,3584.987585836944,3600.7800441982563,3616.5725025595693,3632.3649609208824,3648.1574192821954,3663.9498776435084,3679.7423360048197,3695.5347943661327,3711.3272527274457,3727.119711088759,3742.912169450071,3758.704627811384,3774.497086172696,3790.289544534009,3806.0820028953212,3821.8744612566343,3837.6669196179473,3853.4593779792604,3869.2518363405734,3885.0442947018846,3900.8367530631976,3916.6292114245107,3932.4216697858237,3948.2141281471368,3964.006586508449,3979.799044869761,3995.591503231074,4011.383961592387,4027.1764199537,4042.9688783150123,4058.7613366763253,4074.5537950376374,4090.3462533989505,4106.1387117602635,4121.931170121576,4137.723628482889,4153.516086844202,4169.308545205513,4185.101003566827,4200.893461928139,4216.685920289452,4232.478378650765,4248.270837012077,4264.063295373389,4279.855753734702,4295.648212096015,4311.440670457328,4327.233128818641,4343.025587179954,4358.818045541267,4301.087269996007,4320.447144082067,4339.807018168125,4359.166892254185,4378.526766340245,4397.886640426304,4417.246514512364,4436.606388598424,4455.966262684482,4475.326136770544,4494.686010856603,4514.045884942663,4533.405759028721,4552.765633114783,4572.125507200843,4591.4853812869005,4610.84525537296,4630.20512945902,4649.56500354508,4668.92487763114,4688.2847517171995,4707.644625803257,4727.004499889319,4746.364373975379,4765.724248061437,4785.084122147497,4804.443996233558,4823.803870319616,4843.163744405676,4862.523618491736,4881.883492577796,4901.243366663855,4920.603240749915,4939.963114835975,4959.322988922033,4978.6828630080945,4998.042737094154,5017.402611180212,5036.762485266272,5056.122359352334,5075.482233438392,5094.842107524451,5114.201981610511,5133.561855696571,5152.921729782631,5172.281603868691,5191.64147795475,5211.001352040808,5230.36122612687,5249.72110021293,5269.080974298988,5288.4408483850475,5307.800722471109,5327.160596557167,5346.520470643227,5365.880344729287,5385.240218815346,5404.600092901406,5423.959966987466,5443.319841073524,5462.679715159584,5482.039589245645,5501.399463331703,5520.759337417763,5540.119211503823,5559.479085589883,5578.8389596759425,5598.198833762002,5617.55870784806,5636.918581934122,5656.278456020182,5675.63833010624,5694.998204192299,5714.358078278359,5733.717952364421,5753.077826450479,5772.437700536539,5791.797574622598,5811.157448708658,5830.517322794718,3116.8683329305763,3131.748021428138,3146.627709925699,3161.507398423261,3176.3870869208217,3191.2667754183835,3206.1464639159444,3221.026152413506,3235.905840911067,3250.785529408629,3265.66521790619,3280.5449064037516,3295.4245949013134,3310.3042833988743,3325.183971896436,3340.063660393997,3354.943348891559,3369.8230373891197,3384.7027258866815,3399.5824143842424,3414.462102881804,3429.341791379365,3444.221479876927,3459.1011683744887,3473.9808568720496,3488.8605453696114,3503.7402338671723,3518.619922364734,3533.499610862295,3548.3792993598568,3563.2589878574177,3578.1386763549795,3593.0183648525403,3607.898053350102,3622.777741847663,3637.657430345225,3652.5371188427866,3667.4168073403475,3682.2964958379093,3697.17618433547,3712.055872833032,3726.935561330593,3741.8152498281547,3756.6949383257156,3771.5746268232774,3786.454315320839,3801.3340038184,3816.213692315962,3831.093380813523,3845.9730693110846,3860.8527578086455,3875.7324463062073,3890.612134803768,3905.49182330133,3920.371511798891,3935.2512002964527,3950.1308887940136,3965.0105772915754,3979.890265789137,3994.769954286698,4009.64964278426,4024.5293312818208,4039.4090197793826,4054.2887082769435,4069.1683967745053,4084.048085272066,4098.927773769628,4113.80746226719,4128.68715076475,4143.566839262312,4158.446527759874,4173.326216257436,4188.205904754996,4203.085593252557,4217.965281750119,4232.844970247681,4247.724658745243,4262.604347242803,4277.484035740365,4292.363724237926],\n",
       "\"species\":[\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\"]\n",
       "}\n",
       "}],\n",
       "\"metainfo_list\":[],\n",
       "\"spec_id\":\"1\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ],
      "text/plain": [
       "<lets_plot.plot.core.PlotSpec at 0x2696aa276b0>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(\n",
    "    ggplot(data=penguins, mapping=aes(x=\"flipper_length_mm\", y=\"body_mass_g\",color = \"species\"))\n",
    "    + geom_point()\n",
    "    + geom_smooth(method=\"lm\")\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"w6Al7o\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"w6Al7o\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"data\":{\n",
       "\"species\":[\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\"],\n",
       "\"flipper_length_mm\":[181.0,186.0,195.0,null,193.0,190.0,181.0,195.0,193.0,190.0,186.0,180.0,182.0,191.0,198.0,185.0,195.0,197.0,184.0,194.0,174.0,180.0,189.0,185.0,180.0,187.0,183.0,187.0,172.0,180.0,178.0,178.0,188.0,184.0,195.0,196.0,190.0,180.0,181.0,184.0,182.0,195.0,186.0,196.0,185.0,190.0,182.0,179.0,190.0,191.0,186.0,188.0,190.0,200.0,187.0,191.0,186.0,193.0,181.0,194.0,185.0,195.0,185.0,192.0,184.0,192.0,195.0,188.0,190.0,198.0,190.0,190.0,196.0,197.0,190.0,195.0,191.0,184.0,187.0,195.0,189.0,196.0,187.0,193.0,191.0,194.0,190.0,189.0,189.0,190.0,202.0,205.0,185.0,186.0,187.0,208.0,190.0,196.0,178.0,192.0,192.0,203.0,183.0,190.0,193.0,184.0,199.0,190.0,181.0,197.0,198.0,191.0,193.0,197.0,191.0,196.0,188.0,199.0,189.0,189.0,187.0,198.0,176.0,202.0,186.0,199.0,191.0,195.0,191.0,210.0,190.0,197.0,193.0,199.0,187.0,190.0,191.0,200.0,185.0,193.0,193.0,187.0,188.0,190.0,192.0,185.0,190.0,184.0,195.0,193.0,187.0,201.0,211.0,230.0,210.0,218.0,215.0,210.0,211.0,219.0,209.0,215.0,214.0,216.0,214.0,213.0,210.0,217.0,210.0,221.0,209.0,222.0,218.0,215.0,213.0,215.0,215.0,215.0,216.0,215.0,210.0,220.0,222.0,209.0,207.0,230.0,220.0,220.0,213.0,219.0,208.0,208.0,208.0,225.0,210.0,216.0,222.0,217.0,210.0,225.0,213.0,215.0,210.0,220.0,210.0,225.0,217.0,220.0,208.0,220.0,208.0,224.0,208.0,221.0,214.0,231.0,219.0,230.0,214.0,229.0,220.0,223.0,216.0,221.0,221.0,217.0,216.0,230.0,209.0,220.0,215.0,223.0,212.0,221.0,212.0,224.0,212.0,228.0,218.0,218.0,212.0,230.0,218.0,228.0,212.0,224.0,214.0,226.0,216.0,222.0,203.0,225.0,219.0,228.0,215.0,228.0,216.0,215.0,210.0,219.0,208.0,209.0,216.0,229.0,213.0,230.0,217.0,230.0,217.0,222.0,214.0,null,215.0,222.0,212.0,213.0,192.0,196.0,193.0,188.0,197.0,198.0,178.0,197.0,195.0,198.0,193.0,194.0,185.0,201.0,190.0,201.0,197.0,181.0,190.0,195.0,181.0,191.0,187.0,193.0,195.0,197.0,200.0,200.0,191.0,205.0,187.0,201.0,187.0,203.0,195.0,199.0,195.0,210.0,192.0,205.0,210.0,187.0,196.0,196.0,196.0,201.0,190.0,212.0,187.0,198.0,199.0,201.0,193.0,203.0,187.0,197.0,191.0,203.0,202.0,194.0,206.0,189.0,195.0,207.0,202.0,193.0,210.0,198.0],\n",
       "\"body_mass_g\":[3750.0,3800.0,3250.0,null,3450.0,3650.0,3625.0,4675.0,3475.0,4250.0,3300.0,3700.0,3200.0,3800.0,4400.0,3700.0,3450.0,4500.0,3325.0,4200.0,3400.0,3600.0,3800.0,3950.0,3800.0,3800.0,3550.0,3200.0,3150.0,3950.0,3250.0,3900.0,3300.0,3900.0,3325.0,4150.0,3950.0,3550.0,3300.0,4650.0,3150.0,3900.0,3100.0,4400.0,3000.0,4600.0,3425.0,2975.0,3450.0,4150.0,3500.0,4300.0,3450.0,4050.0,2900.0,3700.0,3550.0,3800.0,2850.0,3750.0,3150.0,4400.0,3600.0,4050.0,2850.0,3950.0,3350.0,4100.0,3050.0,4450.0,3600.0,3900.0,3550.0,4150.0,3700.0,4250.0,3700.0,3900.0,3550.0,4000.0,3200.0,4700.0,3800.0,4200.0,3350.0,3550.0,3800.0,3500.0,3950.0,3600.0,3550.0,4300.0,3400.0,4450.0,3300.0,4300.0,3700.0,4350.0,2900.0,4100.0,3725.0,4725.0,3075.0,4250.0,2925.0,3550.0,3750.0,3900.0,3175.0,4775.0,3825.0,4600.0,3200.0,4275.0,3900.0,4075.0,2900.0,3775.0,3350.0,3325.0,3150.0,3500.0,3450.0,3875.0,3050.0,4000.0,3275.0,4300.0,3050.0,4000.0,3325.0,3500.0,3500.0,4475.0,3425.0,3900.0,3175.0,3975.0,3400.0,4250.0,3400.0,3475.0,3050.0,3725.0,3000.0,3650.0,4250.0,3475.0,3450.0,3750.0,3700.0,4000.0,4500.0,5700.0,4450.0,5700.0,5400.0,4550.0,4800.0,5200.0,4400.0,5150.0,4650.0,5550.0,4650.0,5850.0,4200.0,5850.0,4150.0,6300.0,4800.0,5350.0,5700.0,5000.0,4400.0,5050.0,5000.0,5100.0,4100.0,5650.0,4600.0,5550.0,5250.0,4700.0,5050.0,6050.0,5150.0,5400.0,4950.0,5250.0,4350.0,5350.0,3950.0,5700.0,4300.0,4750.0,5550.0,4900.0,4200.0,5400.0,5100.0,5300.0,4850.0,5300.0,4400.0,5000.0,4900.0,5050.0,4300.0,5000.0,4450.0,5550.0,4200.0,5300.0,4400.0,5650.0,4700.0,5700.0,4650.0,5800.0,4700.0,5550.0,4750.0,5000.0,5100.0,5200.0,4700.0,5800.0,4600.0,6000.0,4750.0,5950.0,4625.0,5450.0,4725.0,5350.0,4750.0,5600.0,4600.0,5300.0,4875.0,5550.0,4950.0,5400.0,4750.0,5650.0,4850.0,5200.0,4925.0,4875.0,4625.0,5250.0,4850.0,5600.0,4975.0,5500.0,4725.0,5500.0,4700.0,5500.0,4575.0,5500.0,5000.0,5950.0,4650.0,5500.0,4375.0,5850.0,4875.0,6000.0,4925.0,null,4850.0,5750.0,5200.0,5400.0,3500.0,3900.0,3650.0,3525.0,3725.0,3950.0,3250.0,3750.0,4150.0,3700.0,3800.0,3775.0,3700.0,4050.0,3575.0,4050.0,3300.0,3700.0,3450.0,4400.0,3600.0,3400.0,2900.0,3800.0,3300.0,4150.0,3400.0,3800.0,3700.0,4550.0,3200.0,4300.0,3350.0,4100.0,3600.0,3900.0,3850.0,4800.0,2700.0,4500.0,3950.0,3650.0,3550.0,3500.0,3675.0,4450.0,3400.0,4300.0,3250.0,3675.0,3325.0,3950.0,3600.0,4050.0,3350.0,3450.0,3250.0,4050.0,3800.0,3525.0,3950.0,3650.0,3650.0,4000.0,3400.0,3775.0,4100.0,3775.0]\n",
       "},\n",
       "\"mapping\":{\n",
       "\"x\":\"flipper_length_mm\",\n",
       "\"y\":\"body_mass_g\"\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"species\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"island\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"bill_length_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"bill_depth_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"flipper_length_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"body_mass_g\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"sex\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"year\"\n",
       "}]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"geom\":\"point\",\n",
       "\"mapping\":{\n",
       "\"color\":\"species\"\n",
       "},\n",
       "\"data_meta\":{\n",
       "},\n",
       "\"data\":{\n",
       "}\n",
       "},{\n",
       "\"geom\":\"smooth\",\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data_meta\":{\n",
       "},\n",
       "\"method\":\"lm\",\n",
       "\"data\":{\n",
       "\"..ymin..\":[2669.0829619547385,2708.191330915215,2747.2891616394313,2786.3757550179967,2825.4503532070376,2864.5121339015614,2903.5602040158606,2942.593592715603,2981.6112437444745,3020.612006988039,3059.5946292193657,3098.557743975933,3137.4998605266396,3176.4193519028368,3215.31444199035,3254.183191712799,3293.0234843834382,3331.8330103666913,3370.6092512759383,3409.349464045586,3448.0506653576085,3486.7096170800232,3525.3228135895347,3563.886472102566,3602.3965274221723,3640.848632808855,3679.2381689755334,3717.5602634498055,3755.809822681902,3793.9815792277273,3832.070156013664,3870.070149002556,3907.9762284572207,3945.7832574180043,3983.4864240370607,4021.0813822206687,4058.5643929205585,4095.9324567791027,4133.183428088482,4170.316100502513,4207.330256773875,4244.226677830241,4281.007110318461,4317.674195708782,4354.231367495711,4390.682725425612,4427.032896747044,4463.286894234424,4499.449979437283,4535.527537650992,4571.524968905304,4607.447597169865,4643.300598211111,4679.088945212248,4714.817370398146,4750.4903404366405,4786.112043231508,4821.686383787892,4857.216987035481,4892.7072057716105,4928.160132187249,4963.578611732015,4998.9652583409925,5034.322470277379,5069.652446038364,5104.957199928535,5140.238577029408,5175.498267389713,5210.737819333816,5245.958651839483,5281.1620659749615,5316.349255412594,5351.521316054389,5386.6792548166195,5421.823997627202,5456.956396692646,5492.077237092054,5527.187242754416,5562.2870818731735,5597.377371809063],\n",
       "\"..ymax..\":[2861.089165589563,2896.194680628072,2931.3107339028415,2966.438024523262,3001.577310333203,3036.729413637665,3071.8952275223514,3107.075722821595,3142.271955791709,3177.4850765471265,3212.7163383147854,3247.9671075572037,3283.238875005483,3318.533267628268,3353.85206153974,3389.197195816277,3424.5707871446234,3459.975145160356,3495.412788250091,3530.886459479429,3566.3991421663923,3601.9540744429632,3637.5547619324375,3673.204987418388,3708.9088160977676,3744.6705947100704,3780.494942542378,3816.3867320670915,3852.351056833977,3888.3931842871375,3924.5184915001864,3960.7323825102803,3997.040187054601,4033.4470420927996,4069.957759472729,4106.576685288106,4143.307558587202,4180.15337872764,4217.116291417246,4254.197503002201,4291.397230729825,4328.714693672445,4366.1481451832105,4403.694943791872,4441.351656003928,4479.114182073013,4516.9778947505665,4554.937781262169,4592.988580058295,4631.124905843572,4669.341358588245,4707.632614322671,4745.99349728041,4784.419034278255,4822.904493091343,4861.445407051834,4900.037588255948,4938.6771316985505,4977.360412449947,5016.084077712803,5054.845035296151,5093.64043975037,5132.467677140378,5171.324349202974,5210.208257440974,5249.117387549789,5288.049894447899,5327.004088086579,5365.978420141461,5404.971471634781,5443.981941498288,5483.008636059641,5522.0504594168315,5561.106404653583,5600.175545841987,5639.257030775528,5678.350074375102,5717.453952711726,5756.567997591954,5795.69159165505],\n",
       "\"flipper_length_mm\":[172.0,172.74683544303798,173.49367088607596,174.2405063291139,174.9873417721519,175.73417721518987,176.48101265822785,177.22784810126583,177.9746835443038,178.72151898734177,179.46835443037975,180.21518987341773,180.9620253164557,181.70886075949366,182.45569620253164,183.20253164556962,183.9493670886076,184.69620253164558,185.44303797468353,186.18987341772151,186.9367088607595,187.68354430379748,188.43037974683546,189.1772151898734,189.9240506329114,190.67088607594937,191.41772151898735,192.1645569620253,192.91139240506328,193.65822784810126,194.40506329113924,195.15189873417722,195.8987341772152,196.64556962025316,197.39240506329114,198.13924050632912,198.8860759493671,199.63291139240505,200.37974683544303,201.126582278481,201.873417721519,202.62025316455697,203.36708860759495,204.1139240506329,204.86075949367088,205.60759493670886,206.35443037974684,207.1012658227848,207.84810126582278,208.59493670886076,209.34177215189874,210.08860759493672,210.8354430379747,211.58227848101265,212.32911392405063,213.0759493670886,213.82278481012656,214.56962025316454,215.31645569620252,216.0632911392405,216.81012658227849,217.55696202531647,218.30379746835445,219.0506329113924,219.79746835443038,220.54430379746836,221.2911392405063,222.0379746835443,222.78481012658227,223.53164556962025,224.27848101265823,225.0253164556962,225.7721518987342,226.51898734177215,227.26582278481013,228.0126582278481,228.75949367088606,229.50632911392404,230.25316455696202,231.0],\n",
       "\"body_mass_g\":[2765.0860637721507,2802.1930057716436,2839.2999477711364,2876.4068897706293,2913.5138317701203,2950.620773769613,2987.727715769106,3024.834657768599,3061.9415997680917,3099.0485417675827,3136.1554837670756,3173.2624257665684,3210.3693677660613,3247.4763097655523,3284.583251765045,3321.690193764538,3358.797135764031,3395.9040777635237,3433.0110197630147,3470.1179617625075,3507.2249037620004,3544.3318457614932,3581.438787760986,3618.545729760477,3655.65267175997,3692.759613759463,3729.8665557589557,3766.9734977584485,3804.0804397579395,3841.1873817574324,3878.294323756925,3915.401265756418,3952.508207755911,3989.615149755402,4026.722091754895,4063.8290337543876,4100.9359757538805,4138.0429177533715,4175.149859752864,4212.256801752357,4249.36374375185,4286.470685751343,4323.577627750836,4360.684569750327,4397.79151174982,4434.8984537493125,4472.005395748805,4509.112337748296,4546.219279747789,4583.326221747282,4620.433163746775,4657.540105746268,4694.647047745761,4731.753989745252,4768.860931744744,4805.967873744237,4843.074815743728,4880.181757743221,4917.288699742714,4954.395641742207,4991.5025837417,5028.609525741193,5065.716467740685,5102.823409740176,5139.930351739669,5177.037293739162,5214.144235738653,5251.251177738146,5288.358119737639,5325.465061737132,5362.5720037366245,5399.678945736117,5436.78588773561,5473.892829735101,5510.999771734594,5548.106713734087,5585.213655733578,5622.320597733071,5659.427539732564,5696.5344817320565]\n",
       "}\n",
       "}],\n",
       "\"metainfo_list\":[],\n",
       "\"spec_id\":\"2\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ],
      "text/plain": [
       "<lets_plot.plot.core.PlotSpec at 0x26967237a70>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(ggplot(data=penguins, mapping=aes(x=\"flipper_length_mm\", y=\"body_mass_g\"))\n",
    "+ geom_point(mapping=aes(color = \"species\"))\n",
    "+ geom_smooth(method=\"lm\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"ZItkCk\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"ZItkCk\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"data\":{\n",
       "\"species\":[\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\"],\n",
       "\"flipper_length_mm\":[181.0,186.0,195.0,null,193.0,190.0,181.0,195.0,193.0,190.0,186.0,180.0,182.0,191.0,198.0,185.0,195.0,197.0,184.0,194.0,174.0,180.0,189.0,185.0,180.0,187.0,183.0,187.0,172.0,180.0,178.0,178.0,188.0,184.0,195.0,196.0,190.0,180.0,181.0,184.0,182.0,195.0,186.0,196.0,185.0,190.0,182.0,179.0,190.0,191.0,186.0,188.0,190.0,200.0,187.0,191.0,186.0,193.0,181.0,194.0,185.0,195.0,185.0,192.0,184.0,192.0,195.0,188.0,190.0,198.0,190.0,190.0,196.0,197.0,190.0,195.0,191.0,184.0,187.0,195.0,189.0,196.0,187.0,193.0,191.0,194.0,190.0,189.0,189.0,190.0,202.0,205.0,185.0,186.0,187.0,208.0,190.0,196.0,178.0,192.0,192.0,203.0,183.0,190.0,193.0,184.0,199.0,190.0,181.0,197.0,198.0,191.0,193.0,197.0,191.0,196.0,188.0,199.0,189.0,189.0,187.0,198.0,176.0,202.0,186.0,199.0,191.0,195.0,191.0,210.0,190.0,197.0,193.0,199.0,187.0,190.0,191.0,200.0,185.0,193.0,193.0,187.0,188.0,190.0,192.0,185.0,190.0,184.0,195.0,193.0,187.0,201.0,211.0,230.0,210.0,218.0,215.0,210.0,211.0,219.0,209.0,215.0,214.0,216.0,214.0,213.0,210.0,217.0,210.0,221.0,209.0,222.0,218.0,215.0,213.0,215.0,215.0,215.0,216.0,215.0,210.0,220.0,222.0,209.0,207.0,230.0,220.0,220.0,213.0,219.0,208.0,208.0,208.0,225.0,210.0,216.0,222.0,217.0,210.0,225.0,213.0,215.0,210.0,220.0,210.0,225.0,217.0,220.0,208.0,220.0,208.0,224.0,208.0,221.0,214.0,231.0,219.0,230.0,214.0,229.0,220.0,223.0,216.0,221.0,221.0,217.0,216.0,230.0,209.0,220.0,215.0,223.0,212.0,221.0,212.0,224.0,212.0,228.0,218.0,218.0,212.0,230.0,218.0,228.0,212.0,224.0,214.0,226.0,216.0,222.0,203.0,225.0,219.0,228.0,215.0,228.0,216.0,215.0,210.0,219.0,208.0,209.0,216.0,229.0,213.0,230.0,217.0,230.0,217.0,222.0,214.0,null,215.0,222.0,212.0,213.0,192.0,196.0,193.0,188.0,197.0,198.0,178.0,197.0,195.0,198.0,193.0,194.0,185.0,201.0,190.0,201.0,197.0,181.0,190.0,195.0,181.0,191.0,187.0,193.0,195.0,197.0,200.0,200.0,191.0,205.0,187.0,201.0,187.0,203.0,195.0,199.0,195.0,210.0,192.0,205.0,210.0,187.0,196.0,196.0,196.0,201.0,190.0,212.0,187.0,198.0,199.0,201.0,193.0,203.0,187.0,197.0,191.0,203.0,202.0,194.0,206.0,189.0,195.0,207.0,202.0,193.0,210.0,198.0],\n",
       "\"body_mass_g\":[3750.0,3800.0,3250.0,null,3450.0,3650.0,3625.0,4675.0,3475.0,4250.0,3300.0,3700.0,3200.0,3800.0,4400.0,3700.0,3450.0,4500.0,3325.0,4200.0,3400.0,3600.0,3800.0,3950.0,3800.0,3800.0,3550.0,3200.0,3150.0,3950.0,3250.0,3900.0,3300.0,3900.0,3325.0,4150.0,3950.0,3550.0,3300.0,4650.0,3150.0,3900.0,3100.0,4400.0,3000.0,4600.0,3425.0,2975.0,3450.0,4150.0,3500.0,4300.0,3450.0,4050.0,2900.0,3700.0,3550.0,3800.0,2850.0,3750.0,3150.0,4400.0,3600.0,4050.0,2850.0,3950.0,3350.0,4100.0,3050.0,4450.0,3600.0,3900.0,3550.0,4150.0,3700.0,4250.0,3700.0,3900.0,3550.0,4000.0,3200.0,4700.0,3800.0,4200.0,3350.0,3550.0,3800.0,3500.0,3950.0,3600.0,3550.0,4300.0,3400.0,4450.0,3300.0,4300.0,3700.0,4350.0,2900.0,4100.0,3725.0,4725.0,3075.0,4250.0,2925.0,3550.0,3750.0,3900.0,3175.0,4775.0,3825.0,4600.0,3200.0,4275.0,3900.0,4075.0,2900.0,3775.0,3350.0,3325.0,3150.0,3500.0,3450.0,3875.0,3050.0,4000.0,3275.0,4300.0,3050.0,4000.0,3325.0,3500.0,3500.0,4475.0,3425.0,3900.0,3175.0,3975.0,3400.0,4250.0,3400.0,3475.0,3050.0,3725.0,3000.0,3650.0,4250.0,3475.0,3450.0,3750.0,3700.0,4000.0,4500.0,5700.0,4450.0,5700.0,5400.0,4550.0,4800.0,5200.0,4400.0,5150.0,4650.0,5550.0,4650.0,5850.0,4200.0,5850.0,4150.0,6300.0,4800.0,5350.0,5700.0,5000.0,4400.0,5050.0,5000.0,5100.0,4100.0,5650.0,4600.0,5550.0,5250.0,4700.0,5050.0,6050.0,5150.0,5400.0,4950.0,5250.0,4350.0,5350.0,3950.0,5700.0,4300.0,4750.0,5550.0,4900.0,4200.0,5400.0,5100.0,5300.0,4850.0,5300.0,4400.0,5000.0,4900.0,5050.0,4300.0,5000.0,4450.0,5550.0,4200.0,5300.0,4400.0,5650.0,4700.0,5700.0,4650.0,5800.0,4700.0,5550.0,4750.0,5000.0,5100.0,5200.0,4700.0,5800.0,4600.0,6000.0,4750.0,5950.0,4625.0,5450.0,4725.0,5350.0,4750.0,5600.0,4600.0,5300.0,4875.0,5550.0,4950.0,5400.0,4750.0,5650.0,4850.0,5200.0,4925.0,4875.0,4625.0,5250.0,4850.0,5600.0,4975.0,5500.0,4725.0,5500.0,4700.0,5500.0,4575.0,5500.0,5000.0,5950.0,4650.0,5500.0,4375.0,5850.0,4875.0,6000.0,4925.0,null,4850.0,5750.0,5200.0,5400.0,3500.0,3900.0,3650.0,3525.0,3725.0,3950.0,3250.0,3750.0,4150.0,3700.0,3800.0,3775.0,3700.0,4050.0,3575.0,4050.0,3300.0,3700.0,3450.0,4400.0,3600.0,3400.0,2900.0,3800.0,3300.0,4150.0,3400.0,3800.0,3700.0,4550.0,3200.0,4300.0,3350.0,4100.0,3600.0,3900.0,3850.0,4800.0,2700.0,4500.0,3950.0,3650.0,3550.0,3500.0,3675.0,4450.0,3400.0,4300.0,3250.0,3675.0,3325.0,3950.0,3600.0,4050.0,3350.0,3450.0,3250.0,4050.0,3800.0,3525.0,3950.0,3650.0,3650.0,4000.0,3400.0,3775.0,4100.0,3775.0]\n",
       "},\n",
       "\"mapping\":{\n",
       "\"x\":\"flipper_length_mm\",\n",
       "\"y\":\"body_mass_g\"\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"species\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"island\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"bill_length_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"bill_depth_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"flipper_length_mm\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"body_mass_g\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"sex\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"year\"\n",
       "}]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"geom\":\"point\",\n",
       "\"mapping\":{\n",
       "\"color\":\"species\",\n",
       "\"shape\":\"species\"\n",
       "},\n",
       "\"data_meta\":{\n",
       "},\n",
       "\"data\":{\n",
       "}\n",
       "},{\n",
       "\"geom\":\"smooth\",\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data_meta\":{\n",
       "},\n",
       "\"method\":\"lm\",\n",
       "\"data\":{\n",
       "\"..ymin..\":[2669.0829619547385,2708.191330915215,2747.2891616394313,2786.3757550179967,2825.4503532070376,2864.5121339015614,2903.5602040158606,2942.593592715603,2981.6112437444745,3020.612006988039,3059.5946292193657,3098.557743975933,3137.4998605266396,3176.4193519028368,3215.31444199035,3254.183191712799,3293.0234843834382,3331.8330103666913,3370.6092512759383,3409.349464045586,3448.0506653576085,3486.7096170800232,3525.3228135895347,3563.886472102566,3602.3965274221723,3640.848632808855,3679.2381689755334,3717.5602634498055,3755.809822681902,3793.9815792277273,3832.070156013664,3870.070149002556,3907.9762284572207,3945.7832574180043,3983.4864240370607,4021.0813822206687,4058.5643929205585,4095.9324567791027,4133.183428088482,4170.316100502513,4207.330256773875,4244.226677830241,4281.007110318461,4317.674195708782,4354.231367495711,4390.682725425612,4427.032896747044,4463.286894234424,4499.449979437283,4535.527537650992,4571.524968905304,4607.447597169865,4643.300598211111,4679.088945212248,4714.817370398146,4750.4903404366405,4786.112043231508,4821.686383787892,4857.216987035481,4892.7072057716105,4928.160132187249,4963.578611732015,4998.9652583409925,5034.322470277379,5069.652446038364,5104.957199928535,5140.238577029408,5175.498267389713,5210.737819333816,5245.958651839483,5281.1620659749615,5316.349255412594,5351.521316054389,5386.6792548166195,5421.823997627202,5456.956396692646,5492.077237092054,5527.187242754416,5562.2870818731735,5597.377371809063],\n",
       "\"..ymax..\":[2861.089165589563,2896.194680628072,2931.3107339028415,2966.438024523262,3001.577310333203,3036.729413637665,3071.8952275223514,3107.075722821595,3142.271955791709,3177.4850765471265,3212.7163383147854,3247.9671075572037,3283.238875005483,3318.533267628268,3353.85206153974,3389.197195816277,3424.5707871446234,3459.975145160356,3495.412788250091,3530.886459479429,3566.3991421663923,3601.9540744429632,3637.5547619324375,3673.204987418388,3708.9088160977676,3744.6705947100704,3780.494942542378,3816.3867320670915,3852.351056833977,3888.3931842871375,3924.5184915001864,3960.7323825102803,3997.040187054601,4033.4470420927996,4069.957759472729,4106.576685288106,4143.307558587202,4180.15337872764,4217.116291417246,4254.197503002201,4291.397230729825,4328.714693672445,4366.1481451832105,4403.694943791872,4441.351656003928,4479.114182073013,4516.9778947505665,4554.937781262169,4592.988580058295,4631.124905843572,4669.341358588245,4707.632614322671,4745.99349728041,4784.419034278255,4822.904493091343,4861.445407051834,4900.037588255948,4938.6771316985505,4977.360412449947,5016.084077712803,5054.845035296151,5093.64043975037,5132.467677140378,5171.324349202974,5210.208257440974,5249.117387549789,5288.049894447899,5327.004088086579,5365.978420141461,5404.971471634781,5443.981941498288,5483.008636059641,5522.0504594168315,5561.106404653583,5600.175545841987,5639.257030775528,5678.350074375102,5717.453952711726,5756.567997591954,5795.69159165505],\n",
       "\"flipper_length_mm\":[172.0,172.74683544303798,173.49367088607596,174.2405063291139,174.9873417721519,175.73417721518987,176.48101265822785,177.22784810126583,177.9746835443038,178.72151898734177,179.46835443037975,180.21518987341773,180.9620253164557,181.70886075949366,182.45569620253164,183.20253164556962,183.9493670886076,184.69620253164558,185.44303797468353,186.18987341772151,186.9367088607595,187.68354430379748,188.43037974683546,189.1772151898734,189.9240506329114,190.67088607594937,191.41772151898735,192.1645569620253,192.91139240506328,193.65822784810126,194.40506329113924,195.15189873417722,195.8987341772152,196.64556962025316,197.39240506329114,198.13924050632912,198.8860759493671,199.63291139240505,200.37974683544303,201.126582278481,201.873417721519,202.62025316455697,203.36708860759495,204.1139240506329,204.86075949367088,205.60759493670886,206.35443037974684,207.1012658227848,207.84810126582278,208.59493670886076,209.34177215189874,210.08860759493672,210.8354430379747,211.58227848101265,212.32911392405063,213.0759493670886,213.82278481012656,214.56962025316454,215.31645569620252,216.0632911392405,216.81012658227849,217.55696202531647,218.30379746835445,219.0506329113924,219.79746835443038,220.54430379746836,221.2911392405063,222.0379746835443,222.78481012658227,223.53164556962025,224.27848101265823,225.0253164556962,225.7721518987342,226.51898734177215,227.26582278481013,228.0126582278481,228.75949367088606,229.50632911392404,230.25316455696202,231.0],\n",
       "\"body_mass_g\":[2765.0860637721507,2802.1930057716436,2839.2999477711364,2876.4068897706293,2913.5138317701203,2950.620773769613,2987.727715769106,3024.834657768599,3061.9415997680917,3099.0485417675827,3136.1554837670756,3173.2624257665684,3210.3693677660613,3247.4763097655523,3284.583251765045,3321.690193764538,3358.797135764031,3395.9040777635237,3433.0110197630147,3470.1179617625075,3507.2249037620004,3544.3318457614932,3581.438787760986,3618.545729760477,3655.65267175997,3692.759613759463,3729.8665557589557,3766.9734977584485,3804.0804397579395,3841.1873817574324,3878.294323756925,3915.401265756418,3952.508207755911,3989.615149755402,4026.722091754895,4063.8290337543876,4100.9359757538805,4138.0429177533715,4175.149859752864,4212.256801752357,4249.36374375185,4286.470685751343,4323.577627750836,4360.684569750327,4397.79151174982,4434.8984537493125,4472.005395748805,4509.112337748296,4546.219279747789,4583.326221747282,4620.433163746775,4657.540105746268,4694.647047745761,4731.753989745252,4768.860931744744,4805.967873744237,4843.074815743728,4880.181757743221,4917.288699742714,4954.395641742207,4991.5025837417,5028.609525741193,5065.716467740685,5102.823409740176,5139.930351739669,5177.037293739162,5214.144235738653,5251.251177738146,5288.358119737639,5325.465061737132,5362.5720037366245,5399.678945736117,5436.78588773561,5473.892829735101,5510.999771734594,5548.106713734087,5585.213655733578,5622.320597733071,5659.427539732564,5696.5344817320565]\n",
       "}\n",
       "}],\n",
       "\"metainfo_list\":[],\n",
       "\"spec_id\":\"3\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ],
      "text/plain": [
       "<lets_plot.plot.core.PlotSpec at 0x2696ab84ec0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(ggplot(data=penguins, mapping=aes(x=\"flipper_length_mm\", y=\"body_mass_g\"))\n",
    "+ geom_point(mapping=aes(color = \"species\",shape = \"species\"))\n",
    "+ geom_smooth(method=\"lm\"))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
